package org.yw.fallback;

import org.springframework.stereotype.Service;
import org.yw.dto.Dto;
import org.yw.pojo.DmUser;
import org.yw.service.LoginService;
import org.yw.utils.DtoUtil;
import org.yw.utils.ErrorCode;

import javax.servlet.http.HttpServletRequest;

/**
 * Created By YU WEI on 2020.09.07
 */
@Service
public class LoginServiceFallBack implements LoginService {
    @Override
    public Dto doLogin(String phone, String password) {
        return DtoUtil.returnFail("服务器异常", ErrorCode.AUTH_UNKNOWN);
    }

    @Override
    public Dto register(String phone, String password, String vcode) {
        return DtoUtil.returnFail("服务器异常", ErrorCode.AUTH_UNKNOWN);
    }

    @Override
    public Dto checkPhone(String phone) {
        return DtoUtil.returnFail("服务器异常", ErrorCode.AUTH_UNKNOWN);
    }

    @Override
    public Dto sendCode(String phone) {
        return DtoUtil.returnFail("服务器异常", ErrorCode.AUTH_UNKNOWN);
    }

    @Override
    public Dto queryUserInfoByToken(HttpServletRequest request) {
        return DtoUtil.returnFail("服务器异常", ErrorCode.AUTH_UNKNOWN);
    }

    @Override
    public Dto modifyUserInfo(DmUser user) {
        return DtoUtil.returnFail("服务器异常", ErrorCode.AUTH_UNKNOWN);
    }
}
